﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/philadmin/Philadmin.Master"
    CodeBehind="ViewGallery.aspx.vb" Inherits="Phila.ViewGalley" %>

<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="radG" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table width="100%" cellpadding="3" cellspacing="3" align="center">
        <tr>
            <td>
                <h1>
                    View Gallery</h1>
                <div class="errmsg">
                    <asp:Label ID="lblError" runat="server" Font-Bold="true" ForeColor="red"></asp:Label></div>
                <asp:GridView ID="gvGallery" runat="server" ShowFooter="True" AutoGenerateColumns="False"
                    Width="100%" CssClass="grid">
                    <Columns>
                        <asp:BoundField HeaderText="Id" DataField="Id" />
                        <asp:BoundField HeaderText="Caption" DataField="Caption" />
                        <asp:ImageField HeaderText="Image" DataImageUrlField="Thumbnail" DataImageUrlFormatString="~\Images\Img\{0}">
                        </asp:ImageField>
                        <asp:CheckBoxField HeaderText="IsActive" DataField="IsActive" />
                        <asp:ButtonField ButtonType="Link" CommandName="Edit" Text="Edit" />
                        <asp:ButtonField ButtonType="Link" CommandName="Delete" Text="Delete" />
                    </Columns>
                </asp:GridView>
                <radG:RadGrid ID="radGrid" runat="server" Width="99%" PageSize="20" AllowSorting="True"
                    AllowMultiRowSelection="False" Skin="Telerik" AllowPaging="True" ShowGroupPanel="True"
                    AutoGenerateColumns="False" GridLines="None" EnableAJAX="true" EnableAJAXLoadingTemplate="true">
                    <PagerStyle Mode="NumericPages"></PagerStyle>
                    <MasterTableView Width="100%" GroupLoadMode="Client" GroupsDefaultExpanded="False"
                        CommandItemDisplay="Top" DataKeyNames="ID">
                        <CommandItemTemplate>
                        </CommandItemTemplate>
                        <GroupByExpressions>
                            <radG:GridGroupByExpression>
                                <SelectFields>
                                    <radG:GridGroupByField FieldAlias="Name" FieldName="Name" HeaderText="Tour" />
                                </SelectFields>
                                <GroupByFields>
                                    <radG:GridGroupByField FieldName="Name" FieldAlias="Name" HeaderText="Tour" />
                                </GroupByFields>
                            </radG:GridGroupByExpression>
                        </GroupByExpressions>
                        <CommandItemTemplate>
                            <table width="100%" border="0">
                                <tr>
                                    <td valign="top" align="right">
                                        <a href="EditGallery.aspx?type=<%=Request.QueryString("type")%>">
                                            <img src="../RadControls/Grid/Skins/AddRecord.gif" align="absmiddle" />Add New</a>
                                    </td>
                                </tr>
                            </table>
                        </CommandItemTemplate>
                        <Columns>
                            <radG:GridBoundColumn HeaderText="Id" HeaderButtonType="TextButton"
                                DataField="Id">
                            </radG:GridBoundColumn>
                            <radG:GridBoundColumn SortExpression="Name" HeaderText="Name" HeaderButtonType="TextButton"
                                DataField="Name">
                            </radG:GridBoundColumn>
                            <radG:GridTemplateColumn HeaderText="Thumbnail">
                                <ItemTemplate>
                                    <img src="../images/img/<%#DataBinder.Eval(Container.DataItem,"Thumbnail")%>" />
                                </ItemTemplate>
                                <HeaderStyle Width="180px" />
                            </radG:GridTemplateColumn>
                            <radG:GridButtonColumn ButtonType="ImageButton" ConfirmText="Do you want to delete this record"
                                ImageUrl="../RadControls/Grid/Skins/Delete.gif" Text="Delete" UniqueName="column"
                                CommandName="Delete" HeaderText="Delete">
                                <HeaderStyle Width="40px" />
                            </radG:GridButtonColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings AllowGroupExpandCollapse="true">
                        <Selecting AllowRowSelect="False" />
                    </ClientSettings>
                </radG:RadGrid>
                <%-- <ul id="tourTabs" class="tourTabs">
                    <%If Request.QueryString("type") = "t" Then%>
                    <li><a href="ViewGallery.aspx?type=t" class="sel">Tours Gallery </a></li>
                    <%Else%>
                    <li><a href="ViewGallery.aspx?type=t">Tours Gallery </a></li>
                    <%End If%>
                    <%If Request.QueryString("type") = "h" Then%>
                    <li><a href="ViewGallery.aspx?type=h" class="sel">Hotels Gallery </a></li>
                    <%Else%>
                    <li><a href="ViewGallery.aspx?type=h">Hotels Gallery </a></li>
                    <%End If%>
                </ul>
                <div id="tours" class="tabcontent">
                    <%If Request.QueryString("type") = "t" Then%>
                    <uc3:gallerytour id="gallerytour1" runat="server" />
                    <%Else%>
                    <uc4:galleryhotel id="galleryhotel1" runat="server" />
                    <%End If%>
                </div>
                <script type="text/javascript">
                    var product = new ddtabcontent("tourTabs")
                    product.expandit(1)
                    product.setpersist(false)
                    product.setselectedClassTarget("link") //"link" or "linkparent"
                    product.init()
                </script>--%>
            </td>
        </tr>
    </table>
</asp:Content>
